fs = require("fs")
path = require("path")

dir = process.argv[2]
ext = '.' + process.argv[3].trim()

fs.readdir dir, (error, files)->
  console.log error if error
  for f in files
    if path.extname(f) == ext
      console.log f
